package com.jhws.common.pay.bo;

import com.jhws.common.PropertiesReader;
import com.jhws.common.base.bo.Global;
import com.jhws.util.StringUtils;

public class PayConstants {
    public final static String PAY_TYPE_CASH = "cash";       //现金支付
    public final static String PAY_TYPE_WEIXIN_APP = "wx_app";      //微信APP支付
    public final static String PAY_TYPE_WEIXIN_H5 = "wx_h5";       //微信
    public final static String PAY_TYPE_ALIPAY = "alipay";

    public final static int PAY_STATE_UNPAY = 0;
    public final static int PAY_STATE_PAID = 1;

    /* 微信 */
    public static final String WeixinCreateOrderURL="https://api.mch.weixin.qq.com/pay/unifiedorder";
    public static final String WeixinMchAccessTokenUrl = "https://api.weixin.qq.com/sns/oauth2/access_token";
    public static final String WeixinNotifyUrl = "/api/v2/pay/anon/weixin/notify";
    public static final String WeixinSubscriptionPayUrl = "https://open.weixin.qq.com/connect/oauth2/authorize";

    /* 微信第三方平台-家和社区服务平台 */
    public static final String Weixin3rdCommServiceMsgToken = "df7e93a762a78e2d14a4fe81d1ae9a29";
    public static final String Weixin3rdCommServiceMsgCryptKey = "df7e93a762a78e2d14a4fe81d1ae9a2912345678901";
    public static final String Weixin3rdCommServiceAppId = StringUtils.isEmpty(PropertiesReader.getProperty("basePlatform"))?"wx36d4740106d53daf":"wxcc0d6e6eae430ed0";
    public static final String Weixin3rdCommServiceAppSecret = StringUtils.isEmpty(PropertiesReader.getProperty("basePlatform"))?"7e8a8e5f75febc3f11b8fbc916a13c02":"a95a81a2f542c32a9055bca5402a527e";
    public static final String WeixinURLGetAccessToken = "https://api.weixin.qq.com/cgi-bin/component/api_component_token";
    public static final String WeixinURLGetPreAuthCode = "https://api.weixin.qq.com/cgi-bin/component/api_create_preauthcode";
    public static final String WeixinURL3rdAuth = "https://mp.weixin.qq.com/cgi-bin/componentloginpage";
    public static final String WeixinUrl3rdGetRefreshToken = "https://api.weixin.qq.com/cgi-bin/component/api_query_auth";
    public static final String WeixinUrl3rdGetOpenId = "https://api.weixin.qq.com/sns/oauth2/component/access_token";
    public static final String WeixinUrl3rdGetAuthorizerInfo = "https://api.weixin.qq.com/cgi-bin/component/api_get_authorizer_info";
    /* 微信第三方服务-家和社区服务的令牌相关数据 */
    public static final String REDIS_PAY_WEIXIN_3RD_VERIFY_TICKET = "pay:wx:3rd:cs:tiket";
    public static final String REDIS_PAY_WEIXIN_3RD_ACCESS_TOKEN = "pay:wx:3rd:cs:accessToken";

    /* 支付宝 */
    public final static String AlipaySignTypeRSA2 = "RSA2";
    public final static String AlipayNotifyUrl = "/api/v2/pay/anon/alipay/notify";
    public final static String AlipayGatewayURL = "https://openapi.alipay.com/gateway.do";
    public final static String FormatJson = "json";
}
